package org.finesys.common.dataPermission.config;

import org.finesys.common.dataPermission.factory.DataPermissionRuleFactory;
import org.finesys.common.dataPermission.factory.DataPermissionRuleFactoryImpl;
import org.finesys.common.dataPermission.rule.DataPermissionRule;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

import java.util.List;

@AutoConfiguration
public class DataPermissionAutoConfiguration {
    /**
     * 注入规则工厂
     */
    @Bean
    public DataPermissionRuleFactory dataPermissionRuleFactory(List<DataPermissionRule> rules) {
        return new DataPermissionRuleFactoryImpl(rules);
    }

}
